.class public Lcom/nemustech/regina/AppListProvider;
.super Lcom/nemustech/tiffany/world/TFContentProvider;
.source "AppListProvider.java"


# instance fields
.field private mAppCount:I

.field private mApps:Ljava/util/List;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/List",
            "<",
            "Lcom/nemustech/regina/AppInfo;",
            ">;"
        }
    .end annotation
.end field

.field private mElementAppList:Lcom/nemustech/regina/ElementAppList;

.field private mItemCount:I

.field private mJitImageProvider:Lcom/nemustech/tiffany/world/TFItemProvider$JitImageProvider;


# direct methods
.method public constructor <init>(Lcom/nemustech/regina/ElementAppList;)V
    .locals 1
    .parameter "elementAppList"

    .prologue
    .line 23
    invoke-direct {p0}, Lcom/nemustech/tiffany/world/TFContentProvider;-><init>()V

    .line 37
    new-instance v0, Lcom/nemustech/regina/AppListProvider$1;

    invoke-direct {v0, p0}, Lcom/nemustech/regina/AppListProvider$1;-><init>(Lcom/nemustech/regina/AppListProvider;)V

    iput-object v0, p0, Lcom/nemustech/regina/AppListProvider;->mJitImageProvider:Lcom/nemustech/tiffany/world/TFItemProvider$JitImageProvider;

    .line 24
    iput-object p1, p0, Lcom/nemustech/regina/AppListProvider;->mElementAppList:Lcom/nemustech/regina/ElementAppList;

    .line 25
    iget-object v0, p0, Lcom/nemustech/regina/AppListProvider;->mJitImageProvider:Lcom/nemustech/tiffany/world/TFItemProvider$JitImageProvider;

    invoke-virtual {p0, v0}, Lcom/nemustech/regina/AppListProvider;->setJitImageProvider(Lcom/nemustech/tiffany/world/TFItemProvider$JitImageProvider;)V

    .line 26
    return-void
.end method

.method static synthetic access$000(Lcom/nemustech/regina/AppListProvider;)Ljava/util/List;
    .locals 1
    .parameter "x0"

    .prologue
    .line 15
    iget-object v0, p0, Lcom/nemustech/regina/AppListProvider;->mApps:Ljava/util/List;

    return-object v0
.end method

.method static synthetic access$100(Lcom/nemustech/regina/AppListProvider;)Lcom/nemustech/regina/ElementAppList;
    .locals 1
    .parameter "x0"

    .prologue
    .line 15
    iget-object v0, p0, Lcom/nemustech/regina/AppListProvider;->mElementAppList:Lcom/nemustech/regina/ElementAppList;

    return-object v0
.end method


# virtual methods
.method protected applyContent(Lcom/nemustech/tiffany/world/TFObject;I)V
    .locals 6
    .parameter "object"
    .parameter "itemIndex"

    .prologue
    const/4 v5, 0x0

    const/4 v4, 0x0

    .line 52
    iget-object v1, p0, Lcom/nemustech/regina/AppListProvider;->mElementAppList:Lcom/nemustech/regina/ElementAppList;

    invoke-virtual {v1}, Lcom/nemustech/regina/ElementAppList;->getAppPageCount()I

    move-result v1

    if-lez v1, :cond_0

    .line 53
    move-object v0, p1

    check-cast v0, Lcom/nemustech/regina/AppList;

    move-object v1, v0

    invoke-virtual {v1}, Lcom/nemustech/regina/AppList;->getPageIndex()I

    move-result v1

    const/4 v2, -0x1

    if-eq v1, v2, :cond_0

    .line 54
    move-object v0, p1

    check-cast v0, Lcom/nemustech/regina/AppList;

    move-object v1, v0

    iget-object v2, p0, Lcom/nemustech/regina/AppListProvider;->mApps:Ljava/util/List;

    iget v3, p0, Lcom/nemustech/regina/AppListProvider;->mAppCount:I

    invoke-virtual {v1, v2, v3}, Lcom/nemustech/regina/AppList;->setAppInfos(Ljava/util/List;I)V

    .line 55
    move-object v0, p1

    check-cast v0, Lcom/nemustech/regina/AppList;

    move-object v1, v0

    invoke-virtual {v1, p2}, Lcom/nemustech/regina/AppList;->setPageIndex(I)V

    .line 56
    invoke-virtual {p1}, Lcom/nemustech/tiffany/world/TFObject;->isVisible()Z

    move-result v1

    if-eqz v1, :cond_1

    .line 57
    check-cast p1, Lcom/nemustech/tiffany/world/TFModel;

    .end local p1
    iget-object v1, p0, Lcom/nemustech/regina/AppListProvider;->mJitImageProvider:Lcom/nemustech/tiffany/world/TFItemProvider$JitImageProvider;

    invoke-interface {v1, p2, v4}, Lcom/nemustech/tiffany/world/TFItemProvider$JitImageProvider;->getImage(II)Landroid/graphics/Bitmap;

    move-result-object v1

    invoke-virtual {p1, v4, v1}, Lcom/nemustech/tiffany/world/TFModel;->setImageResource(ILandroid/graphics/Bitmap;)Z

    .line 63
    :cond_0
    :goto_0
    return-void

    .line 59
    .restart local p1
    :cond_1
    check-cast p1, Lcom/nemustech/tiffany/world/TFModel;

    .end local p1
    invoke-virtual {p1, v4, v5, v5}, Lcom/nemustech/tiffany/world/TFModel;->setImageResource(ILandroid/graphics/Bitmap;Landroid/graphics/Rect;)Z

    goto :goto_0
.end method

.method public getItemCount()I
    .locals 1

    .prologue
    .line 34
    iget v0, p0, Lcom/nemustech/regina/AppListProvider;->mItemCount:I

    return v0
.end method

.method public loadAppList()V
    .locals 1

    .prologue
    .line 45
    iget-object v0, p0, Lcom/nemustech/regina/AppListProvider;->mElementAppList:Lcom/nemustech/regina/ElementAppList;

    invoke-virtual {v0}, Lcom/nemustech/regina/ElementAppList;->getAppInfos()Ljava/util/List;

    move-result-object v0

    iput-object v0, p0, Lcom/nemustech/regina/AppListProvider;->mApps:Ljava/util/List;

    .line 46
    iget-object v0, p0, Lcom/nemustech/regina/AppListProvider;->mElementAppList:Lcom/nemustech/regina/ElementAppList;

    invoke-virtual {v0}, Lcom/nemustech/regina/ElementAppList;->getAppCount()I

    move-result v0

    iput v0, p0, Lcom/nemustech/regina/AppListProvider;->mAppCount:I

    .line 47
    iget-object v0, p0, Lcom/nemustech/regina/AppListProvider;->mElementAppList:Lcom/nemustech/regina/ElementAppList;

    invoke-virtual {v0}, Lcom/nemustech/regina/ElementAppList;->getAppPageCount()I

    move-result v0

    invoke-virtual {p0, v0}, Lcom/nemustech/regina/AppListProvider;->setItemCount(I)V

    .line 48
    return-void
.end method

.method protected setItemCount(I)V
    .locals 0
    .parameter "count"

    .prologue
    .line 29
    iput p1, p0, Lcom/nemustech/regina/AppListProvider;->mItemCount:I

    .line 30
    return-void
.end method
